home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Precision Software Appli…tions Silver Collection 1
/
Precision Software Applications Silver Collection Volume One (PSM) (1993).iso
/
tutor
/
clipper.exe
/
CLIPVIEW.PRG
< prev
next >
Wrap
Text File
|
1985-08-03
|
5KB
|
188 lines
* clipwage.PRG
set inde to
go bottom
totrecs = recno()
SET INDEX TO userndx
GO BOTT
LAST = RECNO()
VNAME = ' '
VADDRESS = ' '
VROAD = ' '
VTOWN = ' '
VCOUNTY = ' '
VWAGE = 0
VEMP = 0
clear
SET COLO TO 7/0,R/W
@ 1,0 SAY "╔══════════════════════════════════════════════════════════════════════════════╗"
@ 2,0 SAY "║"
SET COLO TO W+/R, R/W
@ 2,1 SAY " C L I P P E R dBASE III True compiler "
SET COLO TO 7/0,R/W
@ 2,79 SAY "║"
@ 3,0 SAY "║"
SET COLO TO W+/R, R/W
@ 3,1 SAY " "
SET COLO TO 7/0,R/W
@ 3,79 SAY "║"
@ 4,0 SAY "║"
SET COLO TO W+/R, R/W
@ 4,1 SAY " Demonstration of data access speed on a database of " + str(totrecs,3,0) + " records "
SET COLO TO 7/0,R/W
@ 4,79 SAY "║"
@ 5,0 SAY "║"
SET COLO TO W+/R, R/W
@ 5,1 SAY " USING INDEX FILE just created on field "
@ 5,61 say FTYPE
sele 1
SET COLO TO 7/0,R/W
@ 5,79 SAY "║"
@ 6,0 SAY "╚══════════════════════════════════════════════════════════════════════════════╝"
@ 8,4 SAY "┌─────────────────────────────────────┐"
@ 9,4 SAY "│"
SET COLO TO W+/R, R/W
@ 9,5 SAY " Name : "
SET COLO TO 7/0,R/W
@ 9,42 SAY "│"
@ 10,4 SAY "└─────────────────────────────────────┘"
@ 8,50 SAY "┌────────────────────────┐"
@ 9,50 SAY "│"
SET COLO TO W+/R, R/W
@ 9,51 SAY " Record No : "
SET COLO TO 7/0,R/W
@ 9,75 SAY "│"
@ 10,50 SAY "└────────────────────────┘"
@ 11,4 SAY "┌─────────────────────────────────────┐ ┌────────────────────────────┐"
@ 12,4 SAY "│"
SET COLO TO W+/R, R/W
@ 12,5 SAY " Address : "
SET COLO TO 7/0,R/W
@ 12,42 SAY "│"
@ 12,47 SAY "│"
SET COLO TO W+/R, R/W
@ 12,48 SAY " Road : "
SET COLO TO 7/0,R/W
@ 12,76 SAY "│"
@ 13,4 SAY "└─────────────────────────────────────┘ └────────────────────────────┘"
@ 14,4 SAY "┌─────────────────────────────┐ ┌───────────────────────────────┐"
@ 15,4 SAY "│"
SET COLO TO W+/R, R/W
@ 15,5 SAY " Town : "
SET COLO TO 7/0,R/W
@ 15,34 SAY "│ │"
SET COLO TO W+/R, R/W
@ 15,42 SAY " County : "
SET COLO TO 7/0,R/W
@ 15,73 SAY "│"
@ 16,4 SAY "└─────────────────────────────┘ └───────────────────────────────┘"
@ 17,4 SAY "╔══════════════════════╗"
@ 18,4 SAY "║"
SET COLO TO W+/R, R/W
@ 18,5 SAY " Salary : "
SET COLO TO 7/0,R/W
@ 18,27 SAY "║"
@ 19,4 SAY "╚══════════════════════╝ ╔═══════════════════════════════╗"
@ 20,4 SAY "╔═══════════════════════╗ ║"
SET COLO TO W+/R, R/W
@ 20,42 SAY "Started employment : "
SET COLO TO 7/0,R/W
@ 20,73 SAY "║"
@ 21,4 SAY "║"
SET COLO TO W+/R, R/W
@ 21,5 SAY " Employee No. : "
SET COLO TO 7/0,R/W
@ 21,28 SAY "║ ╚═══════════════════════════════╝"
@ 22,4 SAY "╚═══════════════════════╝"
set colo to r+/0,r+/0
skey = ' '
LPR = .T.
DO WHILE LPR
VNAME = NAME
VADDRESS = ADDRESS
VROAD = ROAD
VTOWN = TOWN
VCOUNTY = COUNTY
IF EOF()
VNAME = ' '
VADDRESS = ' '
VROAD = ' '
VTOWN = ' '
VCOUNTY = ' '
ENDIF
SET COLO TO /R,r/W
@ 9,17 SAY vname
@ 12,17 SAY vaddress
@ 12,56 SAY vroad
@ 15,14 SAY vtown
@ 15,53 SAY vcounty
@ 18,16 SAY wage
@ 21,22 SAY emp
@ 20,63 SAY start
SET COLO TO W+/
@ 23,0 SAY "Enter Search value for field specified in heading --> "
if FTYPE = "WAGE"
SELE 1
sel = 0.00
SET COLO TO w/,w/
@ 23,57 get sel pict '999999.99'
Read
SET COLO TO R/w
IF SEL = 0
LPR = .F.
LOOP
ENDIF
SEEK sel
set color to gr+/r+
@ 9,66 say str(recno(),3)
endif
if FTYPE = "EMP"
SELE 1
sel = 0
@ 23,57 get sel
Read
IF SEL = 0
LPR = .F.
LOOP
ENDIF
SEEK sel
set color to gr+/r+
@ 9,66 say str(recno(),3)
endif
if FTYPE = "START"
SELE 1
sel = DATE()
@ 23,57 get sel
Read
IF SEL = DATE()
LPR = .F.
LOOP
ENDIF
SEEK sel
set color to gr+/r+
@ 9,66 say str(recno(),3)
endif
if FCLASS = 'C'
SELE 1
SEL = ' '
@ 23,57 get sel
Read
skey = upper(TRIM(sel))
*
* TEST FOR C/R ALONE ENTERED
*
IF LEN(SKEY) = 0
LPR = .F.
LOOP
ENDIF
IF LEN(SKEY) = 1 .AND. (SKEY = 'Q' .OR. SKEY = 'q')
LPR = .F.
LOOP
ENDIF
FIND &skey
set color to gr+/r+
@ 9,66 say str(recno(),3)
endif
clear gets
ENDDO
SET COLO TO 7/0,7/0
return